import { Router } from "express";

import N404 from "./404";
import media from "./media";
import hello from "./hello";

/**
 * 路由信息配置
 */
export interface RoutesConfig {
	path: string;
	route: Router;
}

export function createRoutes(routes: RoutesConfig[]) {
	return routes;
}

export const routes = createRoutes([
	{
		path: "/media",
		route: media,
	},
	{
		path: "/hello",
		route: hello,
	},
	{
		path: "*",
		route: N404,
	},
]);
